<?php include "lang.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <?php include "import.php"; ?>
        <script type="text/javascript">
            $(document).ready(function() {
				$.validator.addMethod("validateEmail", function(value) {
                    var emailRegex = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
                    return emailRegex.test(value) && value != "";
                }, "<?php echo $langs['validation.email']?>");
				
                $("#form").validate({
                    rules: {
                        message: "required",
						email: { validateEmail: true }
                    },
						
                    messages: {
                        message: "<?php echo $langs["validation"];?>"
                    }
                });
            });
        </script>
        <title><?php echo $langs["contact"]; ?></title>
    </head>
    <body>
		<?php include("floating-panel.php"); ?>
        <div class="wrapper">
            <?php include("header.php"); ?>  
            <div class="main_body">
            	<div class="content_box_header">
                     <?php echo $langs["contact"]; ?>
                </div>
                <div class="content_box">
                	<center>
                    	<div id="msg">
						<?php
							if(isset($_GET["e"])){
								$msg = $_GET["e"];
								if($msg == "no")
									echo "<label class=\"error\">".$langs["contact.sendContactFailed"]."</label>";
								else if ($msg == "ok")
									echo "<label class=\"suc\">".$langs["contact.sendContactSuccessfully"]."</label>";
							}
						?>
                        </div>
                    	<form id="form">
                            <table class="register_form">
                                <tr>
                                    <th align="left"><?php echo $langs["contact.fullName"]; ?>:</th>
                                    <td><input type="text" name="fullName" id="fullName"/></td>
                                </tr>
                                <tr>
                                    <th align="left"><?php echo $langs["contact.address"]; ?>:</th>
                                    <td><input type="text" name="address" id="address"/></td>
                                </tr>
                                <tr>
                                    <th align="left"><?php echo $langs["contact.phoneNumber"]; ?>:</th>
                                    <td><input type="text" name="phoneNumber" id="phoneNumber"/></td>
                                </tr>
                                <tr>
                                    <th align="left"><?php echo $langs["contact.email"]; ?>:</th>
                                    <td>
                                    	<input type="text" name="email"/>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <th colspan="2" align="left"><?php echo $langs["contact.message"]; ?>:</th>
                                </tr>
                                 <tr>
                                    <td colspan="2">
                                    	<textarea name="message" class="required"></textarea>
                                    </td>
                                </tr>
                                
                                 <tr>
                                    <td colspan="2">
										<a href="#" class="button right" onclick="submitForm('form', '../action/sendContactAction.php', 'post');"><?php echo $langs["contact.send"]; ?></a>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </center>
                </div>
            </div>
        </div>
          <?php include("footer.php");?>
    </body>
</html>
